<?php
require_once("vcl/vcl.inc.php");
require_once("lib/db_connection.php");
//Includes
use_unit("forms.inc.php");
use_unit("extctrls.inc.php");
use_unit("stdctrls.inc.php");

//Class definition
class Unit1 extends Page
{
       public $hiddenEmission = null;
       public $hiddenVeh = null;
       function Unit1Create($sender, $params)
       {
       $id = $_GET['veh'];
       $this->hiddenVeh->setValue($id);
       $emission_id = $_GET['emission'];
       $this->hiddenEmission->setValue($emission_id);

       $result = mysql_query("delete from veh_emission_tbl where vehicle_id='".$this->hiddenVeh->getValue()."' and emission_id='".$this->hiddenEmission->getValue()."'") or die(mysql_error());
       redirect('details_emission.php?layer=0&veh='.$this->hiddenVeh->getValue());


       }

}

global $application;

global $Unit1;

//Creates the form
$Unit1=new Unit1($application);

//Read from resource file
$Unit1->loadResource(__FILE__);

//Shows the form
$Unit1->show();

?>